package baidumodel.entity.chat;

import lombok.*;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.util.List;

/**
 * Embedding-V1接口响应
 * api :<a href="https://cloud.baidu.com/doc/WENXINWORKSHOP/s/alj562vvu">https://cloud.baidu.com/doc/WENXINWORKSHOP/s/alj562vvu</a>
 *
 * @Author wuchenxi
 * @Date 2023-07-23 17:58:34
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class EmbeddingV1Response extends BaseResponse implements Serializable {

    /**
     * embedding信息，data成员数和文本数量保持一致
     */
    private List<EmbeddingData> data;

    @Data
    public static class EmbeddingData implements Serializable {
        /**
         * 固定值"embedding"
         */
        private String object;
        /**
         * embedding 内容
         */
        private List<Double> embedding;
        /**
         * 序号
         */
        private Integer index;
    }
}
